﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GeneralEventEntry.aspx.cs"
    ValidateRequest="false" Inherits="MTRC.ODMS.Web.SOM.GeneralEvent.GeneralEventEntry" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Src="~/UserControl/Menu/PageFoot.ascx" TagName="PageFoot" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/TabStrip.ascx" TagName="TabStrip" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/PageHead.ascx" TagName="PageHead" TagPrefix="WebStructure" %>
<%@ Register Src="~/UserControl/Menu/MainMenu.ascx" TagName="MainMenu" TagPrefix="WebStructure" %>
<%@ Register Src="../UserControl/UCSignature.ascx" TagName="UCSignature" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" %>
<%@ Register TagPrefix="apj" Namespace="APJ.Web.UI.WebControls" Assembly="APJ.Web.UI.WebControls" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Operational Data Management System</title>     
    <link href="<%=ResolveUrl("~/CSS/common.css")%>" rel="stylesheet" type="text/css" />
    <%-- add by gordon 20160222 Spell check on “General Event” description --%>
    <script src="../../SpellChecking/spell.js" type="text/javascript"></script>
    <script language="JavaScript" src="../../Javascript/CommonFunction.js"></script>
    <script language="javascript" src="../../Javascript/TracePageChange.js"></script>
    <script type="text/javascript" src="../../Javascript/date-picker.js"></script>
    <link href="../../CSS/common.css" rel="stylesheet" type="text/css" />
    <link href="~/CSS/Menu.css" rel="stylesheet" type="text/css" />
    <link href="~/CSS/Menu.css" rel="stylesheet" type="text/css" />
    <style>
        .RelativeStationEventNo
        {
            font-weight: bold;
            font-size: 13px;
            color: #022d72;
            font-family: "Tahoma" , "Times New Roman" , "Arial" , "Helvetica" , "sans-serif";
        }
        
        .title1
        {
            font-weight: bold;
            font-size: 15px;
            color: #022d72;
            font-family: "Tahoma" , "Times New Roman" , "Arial" , "Helvetica" , "sans-serif";
        }
    </style>
    <script language="javascript">

        //begin add by hzx ,on 20090106
        function SetHdnIsValueFromPopupValue() {
            document.getElementById("hdnIsValueFromPopup").value = 'N';  //add by hzx on 20090105 change 0824
            //may set hdnExtPartyStaffSnapShotID value to '0' or ''
        }
        function OpenStaffContractorForm() {
            var strURL = "../Popup/PopupSearchStaff.aspx?PageID=GeneralEventEntry"
            window.showModalDialog(strURL, window, "dialogHeight:520px;dialogWidth:740px;center:yes;resizable:no;scroll:no;status:no;unadorne:yes");
            document.getElementById("hdnIsValueFromPopup").value = 'Y'; //add hzx on 20090105

            window.__doPostBack("txtReportBy", ""); //add by zengshunbo 2009-02-13
        }
        //end

        function CopyCheckData(msg) {
            //if (TraceChangeOnPage && !CheckPageChange())
            if (IsPageChanged() || IsServerChanged) {
                //have change
                alert(msg);
                return false;
            }
            else {
                return true;
            }
        }

        function AddCheck(msg) {
            if (IsPageChanged() || IsServerChanged) {
                //have change
                if (confirm(msg)) {
                    return true;
                }
                else {
                    return false;
                }
            }
            else {
                return true;
            }
        }

        function CheckHandOver(msg) {
            if (trim(document.getElementById("txtHandOverDesc").value) != "") {
                if (document.getElementById("chkHandOver").checked == false) {
                    if (confirm(msg)) {
                        document.getElementById("txtHandOverDesc").value = ""
                    }
                    else {
                        document.getElementById("chkHandOver").checked = true;
                    }
                }
            }

        }

        function CheckRemainderTime(msg) {
            if (trim(document.getElementById("dtbRemainerTime$dateTextBox").value) != "") {
                if (document.getElementById("chkRemainder").checked == false) {
                    if (confirm(msg)) {
                        document.getElementById("dtbRemainerTime$dateTextBox").value = "";
                        document.getElementById("dtbRemainerTime_timedateTextBox").value = ""
                    }
                    else {
                        document.getElementById("chkRemainder").checked = true;
                        return false;
                    }
                }
            }
            return true;
        }

        // function ChekcDataToSave(eventCatagory,eventSubCatagory,reportBy,severity,status)
        //update by gordon 20150805 | U129.1
        //        function ChekcDataToSave(DescMsg) 
        function ChekcDataToSave(eventCatagory, eventSubCatagory, DescMsg) {
            //*** update by benson zhong 2015-06-09 begin

            //            else if (trim(document.getElementById("txtReportBy").value) == "") {
            //                alert(reportBy);
            //                document.getElementById("txtReportBy").focus();
            //                return false;
            //            }
            //            else if (document.getElementById("ddlSeverity").options.selectedIndex == 0) {
            //                alert(severity);
            //                document.getElementById("ddlSeverity").focus()
            //                return false;
            //            }
            //            else if (document.getElementById("ddlStatus").options.selectedIndex == 0) {
            //                alert(status);
            //                document.getElementById("ddlStatus").focus()
            //                return false;
            //            } 
            if (trim(document.getElementById("txtDesc").value) == "") {
                alert(DescMsg);
                document.getElementById("txtDesc").focus()
                return false;
            }

            //update by gordon 20150805 | U129.1
            if (document.getElementById("ddlCategory").options.selectedIndex == 0) {
                alert(eventCatagory);
                document.getElementById("ddlCategory").focus();
                return false;
            }
            else if (document.getElementById("ddlSubCategory").options.selectedIndex == 0) {
                alert(eventSubCatagory);

                if (document.getElementById("ddlSubCategory").length > 1) //add by zengshunbo 2009-03-06
                {
                    document.getElementById("ddlSubCategory").focus();
                }
                return false;
            }
            //*** update by benson zhong 2015-06-09 end
            return processing(true);
            //return true;
        }

        function CheckDataToCopy(eventCatagory, eventSubCatagory, desc, severity, status, handOverDesc, msg) {
            //*** update by benson zhong 2015-06-09 begin
            //            if (document.getElementById("ddlCategory").options.selectedIndex==0)
            //            {
            //                alert(eventCatagory);
            //                document.getElementById("ddlCategory").focus();
            //                return false;    
            //            }
            //            else if(document.getElementById("ddlSubCategory").options.selectedIndex==0)
            //            {
            //                alert(eventSubCatagory);
            //                document.getElementById("ddlSubCategory").focus();
            //                return false;
            //            }


            //            else if(document.getElementById("ddlSeverity").options.selectedIndex==0)
            //            {
            //                alert(severity);
            //                document.getElementById("ddlSeverity").focus()
            //                return false;
            //            }
            //            else if(document.getElementById("ddlStatus").options.selectedIndex==0)
            //            {
            //                alert(status);
            //                document.getElementById("ddlStatus").focus()
            //                return false;
            //            }
            //            else if(trim(document.getElementById("txtHandOverDesc").value)=="")
            //            {
            //                alert(handOverDesc);
            //                document.getElementById("txtHandOverDesc").focus()
            //                return false;
            //            } 

            if (trim(document.getElementById("txtDesc").value) == "") {
                alert(desc);
                document.getElementById("txtDesc").focus();
                return false;
            }
            //*** update by benson zhong 2015-06-09 end
            else if (IsPageChanged() || IsServerChanged) { //upd by hjh 20120209 for QC:468
                alert(msg);
                return false;
            }
            return true;
        }

        function LinkToRelativeEvent() {
            if (trim(document.getElementById("txtHdnRelativeStationEventID").value) != "") {
                window.open("GeneralEventEntry.aspx?StationEventID=" + document.getElementById("txtHdnRelativeStationEventID").value);
            }

        }

        function TrimZero(strval) {
            if (strval.substring(0, 1) == "0") {
                strval = strval.substr(1);
                strval = TrimZero(strval);
            }
            return strval;
        }

        function IsInteger(val) {
            var re;
            //re = /^[0-9]*[1-9][0-9]*$/;
            re = /^[0-9]*$/;
            return re.exec(val);
        }

        function CheckCtlNo(obj) {
            if (obj.value != "") {
                if (!IsInteger(obj.value)) {
                    obj.value = obj.title;
                    return false;
                }

                if (obj.value.length >= 2) {
                    obj.value = TrimZero(obj.value);
                }

                if (obj.value == "0") {
                    obj.value = "";
                    obj.focus();
                    return false;
                }


                if (parseInt(obj.value) > 32767) {

                    if (obj.id == "txtRowNo") {
                        alert(document.getElementById("txtHideRowNoOverFlow").value);
                    }
                    else {
                        alert(document.getElementById("txtHideSeqNoOverFlow").value);
                    }
                    obj.value = obj.title;
                    obj.focus();

                    return false;
                }
                return true;

            }
            else
                return true;

        }

        function KeyDown(obj) {
            //alert(window.event.keyCode);

            if (window.event.keyCode == 17 || window.event.keyCode == 16)//17-Ctrl,16-shift
            {
                //event.keyCode=0;
                return false;
            }

            if ((window.event.keyCode == 8) || (window.event.keyCode == 46) || (window.event.keyCode == 37) || (window.event.keyCode == 38) || (window.event.keyCode == 39) || (window.event.keyCode == 40)) {
                return true;
            }

            if ((window.event.keyCode >= 48 && window.event.keyCode <= 57) || (window.event.keyCode >= 96 && window.event.keyCode <= 105)) {
                return true;
            }
            else {
                event.keyCode = 0;
                return false;
            }
        }

        //update by benson 2015-08-31 U186 begin
//        function ShowDetails(clientID) {
//            window.showModalDialog("../PopUp/ShowDetails.aspx?PageID=COM&ID=" + clientID.id, window, "dialogHeight:250px;dialogWidth:300px,center:yes,resizable:no,scroll:no,status:no");
//            return false;
//        }
        //update by benson 2015-08-31 U186 end
        function CancelEnter() {
            var obj = event.srcElement;
            //update by benson 2015-10-24 u254 begin
//            if (obj.id == "txtRegDate" || obj.id == "txtRegTime" || obj.id == "txtRelativeDesc") {
            if ( obj.id == "txtRelativeDesc") {
            //update by benson 2015-10-24 u254 end
                return false;
            }
            else {
                return true;

            }
        }

        //----------------------- Add by zengshunbo 2009-03-12 TD:1217 -----------------------
        document.onkeydown = function () {
            var k = window.event.keyCode;
            if (k == 116) {
                window.event.keyCode = 0;
                window.event.returnValue = false;
            }
        }
        //--------------------- End add by zengshunbo 2009-03-12 TD:1217 ---------------------


        //----------------------- Add by bensonZhong 2015-06-24 -----------------------
        function ShowDetails(clientID) {
            var StatusID=<%=this.StatusID2%>;
            var isConfirm=0;
            if(StatusID=="2"){
                isConfirm=1;
            }
            var isDisabled = 0;
            var isDis = document.getElementById("txtDesc").disabled;
            if(isDis){
                isDisabled = 1;
            }
            var retVal = window.showModalDialog("../Popup/ShowDetails.aspx?PageID=GeneralEventEntry&ID=" + clientID.id+ "&isConfirm=" + isConfirm+"&isDisabled="+isDisabled, window, "dialogHeight:450px;dialogWidth:500px,center:yes,resizable:no,scroll:no,status:no");
            if (typeof (retVal) != "undefined") {
                document.getElementById(clientID.id).value = retVal;
            }
            return false;
        }
        //----------------------- Add by bensonZhong 2015-09-10 -----------------------

        function ShowDetails2(clientID, isConfirm) {
            var retVal = window.showModalDialog("../Popup/ShowDetails.aspx?PageID=GeneralEventEntry&ID=" + clientID.id + "&isConfirm=" + isConfirm, window, "dialogHeight:450px;dialogWidth:500px,center:yes,resizable:no,scroll:no,status:no");
            if (typeof (retVal) != "undefined") {
                document.getElementById(clientID.id).value = retVal;
            }
            return false;
        }

        //----------------------- Add by bensonZhong 2015-08-13 -----------------------
        function backUrl() {
            var pageID = getQueryString("PageID");

            if (pageID == "GeneralEventEnquiry") {
                window.location.href = "../GeneralEvent/GeneralEventEnquiry.aspx?isBack=1";
            }
            if (pageID == "OutstandingActivitiesListing") {
                window.location.href = "../AOActivityListing/OutstandingActivitiesListing.aspx?isBack=1";
            }

        }
        //----------------------- Add by bensonZhong 2015-08-13 -----------------------

    function RegEventTime(bReadOnly)
    {
        //update by gordon 20160215 Add StationEventID  ISU45
//        var returnValue=window.showModalDialog('../Popup/SetRegEventTime.aspx?PageID=GeneralEventEntry&ReadOnly='+bReadOnly+'&TimeType=1',window,'dialogHeight:500px;dialogWidth:830px;center:yes;resizable:no;scroll:no;status:no;unadorne:yes;return false;');
        //update by gordon 20160226 - GE Allow user to amend the description even if the event has been compelted
//        var returnValue=window.showModalDialog('../Popup/SetRegEventTime.aspx?PageID=GeneralEventEntry&ReadOnly='+bReadOnly+'&TimeType=1&StationEventID=<%=StationEventID.ToString() %>',window,'dialogHeight:500px;dialogWidth:830px;center:yes;resizable:no;scroll:no;status:no;unadorne:yes;return false;');
        var returnValue=window.showModalDialog('../Popup/SetRegEventTime.aspx?PageID=GeneralEventEntry&ReadOnly='+bReadOnly+'&TimeType=1&StationEventID=<%=StationEventID.ToString() %>&EventStatusID=<%=StatusID %>&FunctionItemReadOnly=<%=IsReadOnly %>',window,'dialogHeight:600px;dialogWidth:830px;center:yes;resizable:no;scroll:no;status:no;unadorne:yes;return false;');
        //update end by gordon 20160226 - GE Allow user to amend the description even if the event has been compelted
        //update end by gordon 20160215
        if(returnValue == "1")
        {
            
           //document.getElementById("btnAmendTime").style.background="Red";
           // IsServerChanged=true;
            __doPostBack(document.getElementById("hdnRegTimeVal").id, "");   
        }
        //modify by tim 20160517 for SIT20
        else if(returnValue == "2")
        {
            document.getElementById("btnAmendTime").style.background="Red";
        }
        //return false;
    }
    function dtbGeneralEntyRegTimeOnChange(){
        var txtEstimateCompletionDateTimeInputHrs=document.getElementById("txtEstimateCompletionDateTimeInputHrs").value;
        if(txtEstimateCompletionDateTimeInputHrs=="")return;
        var dtbGeneralEntyRegTime_dateTextBox=document.getElementById("dtbGeneralEntyRegTime_dateTextBox").value;
        var dtbGeneralEntyRegTime_timedateTextBox=document.getElementById("dtbGeneralEntyRegTime_timedateTextBox").value;
        if(dtbGeneralEntyRegTime_dateTextBox.length<10 || dtbGeneralEntyRegTime_timedateTextBox.length<5)return;
        
        document.getElementById("hdnRegTimeVal").value=dtbGeneralEntyRegTime_dateTextBox+" "+dtbGeneralEntyRegTime_timedateTextBox;
        __doPostBack(document.getElementById("hdnRegTimeVal").id, "");   
    }
    </script>
    <link href="" rel="stylesheet" type="text/css" />
</head>
<body onkeydown="return CancelEnter();">
    <form id="form1" runat="server">
    <AjaxControlToolkit:ToolkitScriptManager ID="ToolkitScriptManager" runat="server">
    </AjaxControlToolkit:ToolkitScriptManager>
    <table border="0" cellpadding="0" cellspacing="0" class="Page_Container">
        <tr>
            <td colspan="2" class="Page_Head">
                <WebStructure:PageHead ID="PageHead" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="Page_Left" style="height: 99%">
                <WebStructure:MainMenu ID="MainMenu" runat="server" AppPath="../../" CurrMenuID="M1402" />
            </td>
            <td class="Page_Right" style="width: 100%; height: 99%;">
                <table class="Page_Contents">
                    <tr>
                        <td class="TabStrip">
                            <WebStructure:TabStrip ID="TabStrip" CurrMenuID="M140202" ParentMenuID="M1402" DMenuMode="CurrOnly"
                                runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="Contents" style="height: 16px" >
                            <!--*************************************Begin contents********************************************-->
                            <fieldset>
                                <legend class="Title1">
                                    <asp:Label ID="lblMain" runat="server" Text="Main"></asp:Label></legend>
                                <asp:UpdatePanel ID="uppMain" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <table width="100%" border="0">
                                            <tr>
                                                <td style="width: 140px;">
                                                    <asp:Label ID="lblEvent" runat="server" Text="EventNo"></asp:Label>
                                                    <asp:HiddenField ID="hdnReason" runat="server" />
                                                    <asp:HiddenField ID="hdnStationEventLastUpdataTime" runat="server" />
                                                    <%-- add by gordon 20160226 - GE Allow user to amend the description even if the event has been compelted --%>
                                                    <asp:HiddenField ID="hdnIsAmendDescription" runat="server" />
                                                    <asp:HiddenField ID="hdnAmendDescription" runat="server" />
                                                    <asp:HiddenField ID="hdnIsAmendTime" runat="server" />
                                                    <%-- add end by gordon 20160226 - GE Allow user to amend the description even if the event has been compelted --%>
                                                </td>
                                                <td>
                                                    <asp:Label ID="lblEventValue" runat="server" Text=""></asp:Label>
                                                    <asp:Image ID="imgEventStatus" runat="server" />
                                                    <asp:Image ID="imgHighLight" runat="server" />
                                                </td>
                                                <td style="width: 160px">
                                                    <asp:CheckBox ID="chkRemainder" runat="server" Text="Reminder" AutoPostBack="True"
                                                        OnCheckedChanged="chkRemainder_CheckedChanged" Visible="false" />
                                                    <%-- add By Gordon 20150721 U138 --%>
                                                    <asp:Label ID="lblEstimateCompletionDateTimeLbl" runat="server">Estimated Completion Time</asp:Label>
                                                </td>
                                                <td>
                                                    <apj:DateTextBox ID="dtbRemainerTime" runat="server" HasTime="True" Visible="false" />
                                                    <%-- add By Gordon 20150721 U138 --%>
                                                    <asp:UpdatePanel runat="server" ID="updatePanelEstimateHrs" UpdateMode="Conditional">
                                                        <ContentTemplate>
                                                        <%-- edit by dylan 20151028 for u91--%>
                                                            <asp:TextBox ID="txtEstimateCompletionDateTimeInputHrs" TabIndex="8" MaxLength="6"
                                                                runat="server" Width="50px" CssClass="InputTextBox" onkeypress="checkDate2(this,4,1)"
                                                                OnTextChanged="txtEstimateCompletionDateTimeInputHrs_TextChanged" AutoPostBack="True"
                                                                 onpaste="return checkPasteText(this.value);"></asp:TextBox>
                                                            &nbsp;
                                                            <asp:Label ID="lblHours" runat="server" Text=""></asp:Label>
                                                            &nbsp;
                                                            <asp:Label ID="lblEstimateCompletionDateTimeVal" runat="server" Text=""></asp:Label>
                                                            <input type="hidden" id="hdnAmendTimeVal" name="hdnAmendTimeVal" runat="server" />

                                                        </ContentTemplate>
                                                    </asp:UpdatePanel>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 140px;">
                                                    <asp:Label ID="lblStation" runat="server"></asp:Label>
                                                </td>
                                                <td>
                                                    <asp:DropDownList ID="ddlStation" runat="server" CssClass="ddlStation">
                                                    </asp:DropDownList>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 140px">
                                                    <asp:Label ID="lblEventTime" runat="server"></asp:Label><em>*</em>
                                                </td>
                                                <td>
                                                    <%--<asp:TextBox ID="txtRegDate" runat="server" BorderStyle="None" Width="72px"></asp:TextBox>
                                                    <asp:TextBox ID="txtRegTime" runat="server" BorderStyle="None" Width="38px"></asp:TextBox>--%>
                                                    <apj:DateTextBox ID="dtbGeneralEntyRegTime" DateOnChange="dtbGeneralEntyRegTimeOnChange();" TimeOnChange="dtbGeneralEntyRegTimeOnChange();" runat="server" HasTime="True" Visible="true" />
                                                    <asp:Label ID="lblRegTime" runat="server"></asp:Label>
                                                    <asp:HiddenField ID="hfRegDate" runat="server" />
                                                    <asp:HiddenField ID="hfRegTime" runat="server" />
                                                     <input id="btnAmendTime" name="btnAmendTime" runat="server" type="button" title="Change General Event Event Time" value="..." tabindex="1" />
                                                    <input type="hidden" id="hdnRegTimeVal" name="hdnRegTimeVal" runat="server" onserverchange="hdnAmendTimeVal_ServerChange" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="width: 140px;" valign="top" rowspan="2">
                                                    <asp:Label ID="lblDesc" runat="server" Text="Desc"></asp:Label><em>*</em>
                                                </td>
                                                <td valign="top" style="width: 35%" rowspan="2">
                                                    <%-- Update By Gordon 20150721 U138 --%>
                                                    <%--<asp:TextBox ID="txtDesc" runat="server" TextMode="MultiLine" Height="78px" Width="300px"></asp:TextBox>--%>
                                                    <asp:TextBox ID="txtDesc" runat="server" TextMode="MultiLine" Height="98px" 
                                                        Width="85%"></asp:TextBox>
                                                    <%-- update by gordon 20160222 - Spell check on “General Event” description  --%>
                                                    <%--<asp:Button ID="btnMoreArrivalReason" runat="server" OnClientClick="ShowDetails(document.getElementById('txtDesc'));return false;"Text="..." TabIndex="2" />--%>
                                                    <table cellspacing="0" cellpadding="0" 
                                                        style="display:inline; width: 26px; margin-top: 0px;">
                                                        <tr>
                                                            <td><asp:ImageButton ID="btnSpellCheck" 
                                                                    OnClientClick="spellURL='../../SpellChecking/SpellCheck.aspx';checkSpellingById('txtDesc');return false;" 
                                                                    ImageUrl="~/Images/Common/G - spellcheck - 32.png" runat="server" 
                                                                    BorderWidth="1px" /></td>
                                                        </tr>
                                                          <tr>
                                                            <td> &nbsp</td>
                                                        </tr>
                                                        <tr>
                                                            <td><%--<asp:Button ID="btnMoreArrivalReason" runat="server" OnClientClick="ShowDetails(document.getElementById('txtDesc'));return false;"
                                                        Text="..." TabIndex="2" />--%>
                                                        <asp:ImageButton ID="btnMoreArrivalReason" runat="server" ImageUrl="~/Images/Common/view.png"
                                                                            OnClientClick="ShowDetails(document.getElementById('txtDesc'));return false;" TabIndex="2" />
                                                        </td>

                                                        </tr>
                                                    </table>
                                                </td>
                                                <td valign="top" align="Left">
                                                    <asp:Label ID="lblHandOver" runat="server"></asp:Label>
                                                    <asp:CheckBox ID="chkHandOver" runat="server" OnCheckedChanged="chkHandOver_CheckedChanged"
                                                        AutoPostBack="True" />
                                                </td>
                                                <td valign="top" align="left">
                                                    <asp:TextBox ID="txtHandOverDesc" runat="server" TextMode="Multiline" Height="78px"
                                                        Width="300px"></asp:TextBox>
                                                </td>
                                                <%-- delete by gordon 20150805 U129.1 --%>
                                                <%--<td valign="top" align="Left">
                                                        <asp:Label ID="lblHandOver" runat="server"></asp:Label>
                                                        <asp:CheckBox ID="chkHandOver" runat="server" OnCheckedChanged="chkHandOver_CheckedChanged"
                                                            AutoPostBack="True" />
                                                    </td>
                                                    <td valign="top" align="left">
                                                        <asp:TextBox ID="txtHandOverDesc" runat="server" TextMode="Multiline" Height="78px"
                                                            Width="300px"></asp:TextBox>
                                                    </td>--%>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <%-- update by gordon 20150805 U129.1 --%>
                                                    <%--<asp:Label ID="lblRelativeEvent" runat="server"></asp:Label>--%>
                                                    <asp:Label ID="lblRelativeEvent" runat="server" Visible="false"></asp:Label>
                                                    <%-- add by gordon 20150805 U129.1 --%>
                                                    <asp:Label ID="lblSeverity" runat="server" Text="Severity"></asp:Label>
                                                </td>
                                                <td>
                                                    <%-- update by gordon 20150805 U129.1 --%>
                                                    <%--<asp:TextBox ID="txtRelativeDesc" runat="server" Width="124px" BorderStyle="None"
                                                            BorderWidth="0px" CssClass="RelativeStationEventNo"></asp:TextBox>
                                                        <asp:Image ID="imgRelativeView" runat="server" ImageUrl="~/Images/Common/view.png" />
                                                        <div style="display: none;">
                                                            <asp:TextBox ID="txtHdnRelativeStationEventID" runat="server" Width="81px"></asp:TextBox></div>--%>
                                                    <asp:TextBox ID="txtRelativeDesc" runat="server" Width="124px" BorderStyle="None"
                                                        Visible="false" BorderWidth="0px" CssClass="RelativeStationEventNo"></asp:TextBox>
                                                    <asp:Image ID="imgRelativeView" runat="server" ImageUrl="~/Images/Common/view.png"
                                                        Visible="false" />
                                                    <div style="display: none;">
                                                        <asp:TextBox ID="txtHdnRelativeStationEventID" runat="server" Width="81px"></asp:TextBox></div>
                                                    <%-- add by gordon 20150805 U129.1 --%>
                                                    <%-- Update By Gordon 20150721 U138 --%>
                                                    <asp:DropDownList ID="ddlSeverity" runat="server" Width="305px">
                                                    </asp:DropDownList>
                                                </td>
                                                <tr>
                                                    <td style="width: 140px;">
                                                        <asp:Label ID="lblCategory" runat="server" Text="Category"></asp:Label><em>*</em><%-- add by gordon 20150805 U129.1 --%></td>
                                                    <td>
                                                        <%-- Update By Gordon 20150721 U138 --%>
                                                        <%--<asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged"
                                                            Width="305px">
                                                        </asp:DropDownList>--%>
                                                        <asp:DropDownList ID="ddlCategory" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged"
                                                            Width="91%">
                                                        </asp:DropDownList>
                                                        &nbsp;<asp:HiddenField ID="hdnStationEventGeneralID" runat="server" />
                                                    </td>
                                                    <%-- update by gordon 20150805 U129.1 --%>
                                                    <%--<td>
                                                    </td>
                                                    <td>
                                                    </td>--%>
                                                    <td style="width: 160px">
                                                        <asp:Label ID="lblState" runat="server" Text="Status"></asp:Label>
                                                    </td>
                                                    <td>
                                                        <%-- Update By Gordon 20150721 U138 --%>
                                                        <asp:DropDownList ID="ddlStatus" runat="server" Width="305px">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="width: 140px;">
                                                        <asp:Label ID="lblSubCategory" runat="server" Text="Event Sub Category"></asp:Label><em>*</em><%-- add by gordon 20150805 U129.1 --%></td>
                                                    <td>
                                                        <%-- Update By Gordon 20150721 U138 --%>
                                                        <%--<asp:DropDownList ID="ddlSubCategory" runat="server" Width="305px">
                                                        </asp:DropDownList>--%>
                                                        <asp:DropDownList ID="ddlSubCategory" runat="server" Width="91%">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td style="width: 160px;">
                                                        <asp:Label ID="lblReportedby" runat="server">Reported by</asp:Label>
                                                    </td>
                                                    <td>
                                                        <asp:DropDownList ID="ddlReportedby" runat="server" Width="305px">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                                <asp:UpdatePanel ID="uppSeq" runat="server" UpdateMode="Conditional">
                                    <ContentTemplate>
                                        <table width="100%">
                                            <tr>
                                                <td style="width: 100%">
                                                    <div style="float: left;">
                                                        <asp:Label ID="lblPro" runat="server" Text="Process"></asp:Label><asp:Button ID="btnSeqAddNew"
                                                            runat="server" Text="+" OnClick="btnSeqAddNew_Click" />
                                                    </div>
                                                    <div style="padding-right: 42px; float: right; text-align: right;">
                                                        <asp:Button ID="btnSaveTop" runat="server" Enabled="false" Style="display: none"
                                                            OnClick="btnSave_Click" />
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <apj:CommonGridView ID="grvSeqData" runat="server" AllowSorting="True" AscPic="~/Images/Common/arrow_up_green.png"
                                                        AutoGenerateColumns="False" BorderColor="black" CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png"
                                                        PageLinkCount="7" DataKeyNames="StationEventSeqEventID" OnRowCancelingEdit="grvSeqData_RowCancelingEdit"
                                                        OnRowDataBound="grvSeqData_RowDataBound" OnRowDeleting="grvSeqData_RowDeleting"
                                                        OnRowEditing="grvSeqData_RowEditing" PageSize="5" OnRowCommand="grvSeqData_RowCommand"
                                                        OnRowUpdating="grvSeqData_RowUpdating">
                                                        <EmptyDataRowStyle CssClass="GridView_Header"></EmptyDataRowStyle>
                                                        <Columns>
                                                            <asp:TemplateField HeaderText="SOM_GeneralEventTimeAddEM">
                                                                <EditItemTemplate>
                                                                    <div style="display: none">
                                                                        <asp:Label ID="lblGrvEventTimeEdit" runat="server" Text='<%# Bind("SeqEventTime") %>'
                                                                            __designer:wfdid="w6"></asp:Label></div>
                                                                    <table>
                                                                        <tbody>
                                                                            <tr>
                                                                                <td>
                                                                                    <apj:DateTextBox ID="dtbGrvEventEventTime" runat="server" HasTime="True" __designer:wfdid="w7">
                                                                                    </apj:DateTextBox>
                                                                                </td>
                                                                                <td>
                                                                                    <em>*</em>
                                                                                </td>
                                                                            </tr>
                                                                        </tbody>
                                                                    </table>
                                                                </EditItemTemplate>
                                                                <HeaderTemplate>
                                                                    <asp:Label ID="lblSeqEventTime" runat="server" __designer:wfdid="w19"></asp:Label>
                                                                    <%--<asp:Label ID="lblSeqlMustInput" runat="server" ForeColor="Red">*</asp:Label>--%><%-- Remove by jack 20151203 U288 remove * for header EventTime --%>
                                                                </HeaderTemplate>
                                                                <ItemStyle Width="150px"></ItemStyle>
                                                                <HeaderStyle Width="150px"></HeaderStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGrvEventTime" runat="server" Text='<%# FormatDateTime(Eval("SeqEventTime"),true) %>'
                                                                        __designer:wfdid="w17"></asp:Label>
                                                                </ItemTemplate>
                                                                <FooterStyle Width="150px" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="SOM_AssetLoanSupplementaryInfo">
                                                                <EditItemTemplate>
                                                                    <asp:TextBox ID="txtGrvEventDesc" runat="server" Text='<%# Bind("EventDesc") %>'
                                                                        Width="90%" Height="42px" TextMode="MultiLine" __designer:wfdid="w23"></asp:TextBox>
                                                                </EditItemTemplate>
                                                                <ItemStyle Width="60%"></ItemStyle>
                                                                <HeaderStyle Width="400px"></HeaderStyle>
                                                                <ItemTemplate>
                                                                    <asp:Label ID="lblGrvEventDescShow" runat="server" Text='<%# Bind("EventDesc") %>'
                                                                        __designer:wfdid="w19"></asp:Label>
                                                                    <div style="display: none">
                                                                        <asp:TextBox ID="txtGrvEventDescValue" runat="server" Text='<%# Bind("EventDesc") %>'
                                                                            TextMode="MultiLine" __designer:wfdid="w13"></asp:TextBox>&nbsp;</div>
                                                                    <asp:Button ID="btnGrvEventMoreIcon" runat="server" Text="..." __designer:wfdid="w22">
                                                                    </asp:Button>
                                                                </ItemTemplate>
                                                                <FooterStyle Width="60%" />
                                                            </asp:TemplateField>
                                                            <asp:TemplateField ShowHeader="False" HeaderText="COM_Edit">
                                                                <EditItemTemplate>
                                                                    <div style="display: none">
                                                                        <asp:ImageButton ID="imgGrvSeqSave" runat="server" Text="更新" ImageUrl="~/Images/SOM/Save.png"
                                                                            CausesValidation="True" __designer:wfdid="w2" CommandName="Update"></asp:ImageButton>&nbsp;
                                                                    </div>
                                                                    <asp:ImageButton ID="imgGrvSeqCancel" runat="server" Text="取消" ImageUrl="~/Images/SOM/Cancel.gif"
                                                                        CausesValidation="False" __designer:wfdid="w3" CommandName="Cancel"></asp:ImageButton>
                                                                </EditItemTemplate>
                                                                <ItemStyle Width="8%" />
                                                                <HeaderStyle Width="8%" />
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgGrvSeqEdit" runat="server" Text="" ImageUrl="~/Images/SOM/Edit.gif"
                                                                        CausesValidation="False" __designer:wfdid="w1" CommandName="Edit"></asp:ImageButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField ShowHeader="False" HeaderText="COM_Delete">
                                                                <ItemStyle Width="2%" />
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgGrvSeqDelete" runat="server" Text="" ImageUrl="~/Images/SOM/grid_delete.gif"
                                                                        CausesValidation="False" __designer:wfdid="w13" CommandName="Delete"></asp:ImageButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <PagerTemplate>
                                                            <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                                <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                                        <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                                        <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                                        &nbsp; &nbsp;
                                                                        <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                                        &nbsp;<asp:Label runat="server">/</asp:Label>
                                                                        &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                                        <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                                        &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                                            <asp:ListItem Value="5">5</asp:ListItem>
                                                                            <asp:ListItem Value="10">10</asp:ListItem>
                                                                            <asp:ListItem Value="15">15</asp:ListItem>
                                                                            <asp:ListItem Value="20">20</asp:ListItem>
                                                                            <asp:ListItem Value="25">25</asp:ListItem>
                                                                            <asp:ListItem Value="30">30</asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                                        <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                                        <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                                        </asp:Panel>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                                        <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                                    </asp:TableCell>
                                                                </asp:TableRow>
                                                            </asp:Table>
                                                        </PagerTemplate>
                                                        <RowStyle CssClass="GridView_Row"></RowStyle>
                                                        <EmptyDataTemplate>
                                                            <asp:Table runat="server" CssClass="GridView_Header_EmptyData">
                                                                <asp:TableRow runat="server">
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="150px"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="60%"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="8%"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Width="2%"></asp:TableCell>
                                                                </asp:TableRow>
                                                            </asp:Table>
                                                        </EmptyDataTemplate>
                                                        <HeaderStyle CssClass="GridView_Header"></HeaderStyle>
                                                        <AlternatingRowStyle CssClass="GridView_AlternativeRow"></AlternatingRowStyle>
                                                    </apj:CommonGridView>
                                                </td>
                                            </tr>
                                        </table>
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                                <br />
                            </fieldset>
                            <br />
                            <fieldset width="100%" id="fieldsetAttach" runat="server">
                                <legend class="Title1">
                                    <asp:Label ID="lblTitleAttach" runat="server" Text="Attach"></asp:Label></legend>
                                <table width="100%">
                                    <tr>
                                        <td style="height: 33px">
                                            <asp:Label ID="lblDoc" runat="server" Text="Document"></asp:Label>
                                        </td>
                                        <td style="height: 33px">
                                            <asp:FileUpload ID="fupImport" runat="server" Width="500px" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="height: 72px">
                                            <asp:Label ID="lblRemark" runat="server" Text="Mark"></asp:Label>
                                        </td>
                                        <td style="height: 72px">
                                            <asp:TextBox ID="txtAttachDesc" runat="server" Height="42px" TextMode="MultiLine"
                                                Width="490px" MaxLength="500"></asp:TextBox>&nbsp;
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            <asp:Button ID="btnUpload" runat="server" Text="Upload" OnClick="btnUpload_Click" />
                                        </td>
                                    </tr>
                                    <tr style="display: none;">
                                        <td>
                                            <asp:Label ID="lblUsage" runat="server" Text="Usage"></asp:Label>
                                        </td>
                                        <td>
                                            <div style="width: 500px; border: solid 1px red;">
                                                <div style="background-color: yellow; width: 10%;">
                                                    &nbsp;
                                                </div>
                                            </div>
                                            <asp:Label ID="lblRoomLeft" runat="server"></asp:Label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblAtch" runat="server"></asp:Label>
                                        </td>
                                        <td>
                                            <asp:UpdatePanel ID="uppAttach" runat="server" UpdateMode="Conditional">
                                                <ContentTemplate>
                                                    <apj:CommonGridView ID="grvAttach" runat="server" AllowSorting="True" AscPic="~/Images/Common/arrow_up_green.png"
                                                        AutoGenerateColumns="False" BorderColor="black" CssClass="GridView" DescPic="~/Images/Common/arrow_down_green.png"
                                                        PageLinkCount="7" AllowPaging="True" PageSize="5" DataKeyNames="StationEventAttachID"
                                                        OnNeedDataBind="grvAttach_NeedDataBind" OnRowDataBound="grvAttach_RowDataBound"
                                                        OnRowDeleting="grvAttach_RowDeleting" OnRowCommand="grvAttach_RowCommand">
                                                        <EmptyDataRowStyle CssClass="GridView_Header" />
                                                        <PagerTemplate>
                                                            <asp:Table ID="CommonPagerTemplate" runat="server" Width="100%">
                                                                <asp:TableRow ID="COMGRIDV_TR" runat="server">
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_TotalRecords" runat="server" CssClass="GridView_Pager_Cell_TotalRecords">
                                                                        <asp:Label ID="Lbl_T_TotalRecords" runat="server">Total Records:</asp:Label>
                                                                        <asp:Label ID="Lbl_V_TotalRecords" runat="server"></asp:Label>
                                                                        &nbsp; &nbsp;
                                                                        <asp:Label ID="Lbl_V_CurPage" runat="server"></asp:Label>
                                                                        &nbsp;<asp:Label runat="server">/</asp:Label>
                                                                        &nbsp;<asp:Label ID="Lbl_V_TotalPages" runat="server"></asp:Label>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PageSize" runat="server" CssClass="GridView_Pager_Cell_PageSize">
                                                                        <asp:Label ID="Lbl_T_PageSize" runat="server">PageSize:</asp:Label>
                                                                        &nbsp;&nbsp;<asp:DropDownList ID="DDL_PageSize" runat="server" AutoPostBack="True">
                                                                            <asp:ListItem Value="5">5</asp:ListItem>
                                                                            <asp:ListItem Value="10">10</asp:ListItem>
                                                                            <asp:ListItem Value="15">15</asp:ListItem>
                                                                            <asp:ListItem Value="20">20</asp:ListItem>
                                                                            <asp:ListItem Value="25">25</asp:ListItem>
                                                                            <asp:ListItem Value="30">30</asp:ListItem>
                                                                        </asp:DropDownList>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Prev" runat="server" CssClass="GridView_Pager_Cell_Prev">
                                                                        <asp:LinkButton ID="LBtn_Previous" runat="server" CommandArgument="Prev" CommandName="Page"><</asp:LinkButton>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_PagerLink" runat="server" CssClass="GridView_Pager_Cell_PagerLink">
                                                                        <asp:Panel ID="Pnl_PageLink" runat="server" CssClass="GridView_Pager_PageLinkPanel">
                                                                        </asp:Panel>
                                                                    </asp:TableCell>
                                                                    <asp:TableCell ID="COMGRIDV_Pager_Cell_Next" runat="server" CssClass="GridView_Pager_Cell_Next">
                                                                        <asp:LinkButton ID="LBtn_Next" runat="server" CommandArgument="Next" CommandName="Page">></asp:LinkButton>
                                                                    </asp:TableCell>
                                                                </asp:TableRow>
                                                            </asp:Table>
                                                        </PagerTemplate>
                                                        <RowStyle CssClass="GridView_Row" />
                                                        <HeaderStyle CssClass="GridView_Header" />
                                                        <AlternatingRowStyle CssClass="GridView_AlternativeRow" />
                                                        <Columns>
                                                            <asp:BoundField DataField="AttachFileName" HeaderText="SOM_FileName" SortExpression="AttachFileName">
                                                                <ItemStyle Width="32%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField HeaderText="SOM_AssetLoanSupplementaryInfo" DataField="Description"
                                                                SortExpression="Description">
                                                                <ItemStyle Width="47%" />
                                                            </asp:BoundField>
                                                            <asp:BoundField DataField="FileSize" HeaderText="SOM_FileSize" SortExpression="FileSize">
                                                                <ItemStyle Width="10%" />
                                                            </asp:BoundField>
                                                            <asp:TemplateField ShowHeader="False" HeaderText="COM_Delete">
                                                                <ItemStyle Width="2%" />
                                                                <ItemTemplate>
                                                                    <asp:ImageButton ID="imgGrvAttchDelete" runat="server" Text="删除" ImageUrl="~/Images/SOM/grid_delete.gif"
                                                                        __designer:wfdid="w6" CausesValidation="False" CommandName="Delete"></asp:ImageButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                            <asp:TemplateField HeaderText="Download">
                                                                <ItemTemplate>
                                                                    <asp:LinkButton ID="lnkDownload" runat="server" CommandName="download" CommandArgument='<%# Bind("AttachFile") %>'> <%= this.GetLabel("Download") %> </asp:LinkButton>
                                                                </ItemTemplate>
                                                            </asp:TemplateField>
                                                        </Columns>
                                                        <EmptyDataTemplate>
                                                            <asp:Table runat="server" CssClass="GridView_Header_EmptyData">
                                                                <asp:TableRow runat="server">
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="32%"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="55%"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="10%"></asp:TableCell>
                                                                    <asp:TableCell runat="server" Style="border-right: black 1px solid;" Width="2%"></asp:TableCell>
                                                                    <asp:TableCell runat="server"></asp:TableCell>
                                                                </asp:TableRow>
                                                            </asp:Table>
                                                        </EmptyDataTemplate>
                                                    </apj:CommonGridView>
                                                </ContentTemplate>
                                            </asp:UpdatePanel>
                                        </td>
                                    </tr>
                                </table>
                            </fieldset>
                            <table style="width: 55%; padding-top: 10px; float: right;">
                                <tr>
                                    <td align="left" style="padding-right: 57px;">
                                        <%-- update by gordon 20150805 U129.1 --%>
                                        &nbsp;
                                        <%--                                            <fieldset style="width:99%;">
                                                <legend style="background-color:red; width:98%;height:19px;vertical-align:bottom;"><asp:label runat="server" id="lblSignatureBottom" CssClass="title1">Signature</asp:label></legend>
                                                <div style="padding:2px;">
                                                    <uc1:UCSignature ID="ucSignatureBottom" runat="server" />
                                                </div>                                                                                                
                                            </fieldset> --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="padding-right: 49px;">
                                        <%-- update by gordon 20150805 U129.1 --%>
                                        &nbsp;
                                        <%--<asp:Button ID="btnSaveBottom" runat="server" OnClick="btnSave_Click" />--%>
                                    </td>
                                </tr>
                            </table>
                            <!--***********************************End contents*************************************************-->
                        </td>
                    </tr>
                    <tr>
                        <td class="Page_Foot" style="height: 54px">
                            <WebStructure:PageFoot ID="PageFoot" runat="server" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <div id="divFlowMenu" runat="server">
        <img src="../../Images/up.gif" onclick="SwitchMenu(this);" />
        <!--add flow menu items begin-->
        <div>
            <asp:Button ID="btnNew" runat="server" Text="New" OnClick="btnNew_Click" /></div>
        <div>
            <asp:Button ID="btnCopyAsNew" runat="server" Text="Copy as new" OnClick="btnCopyAsNew_Click" /></div>
        <div>
            <asp:Button ID="btnSave" runat="server" Text="Save" OnClick="btnSave_Click" /></div>
        <div>
            
            <input id="btnEdit" name="btnEdit" runat="server" type="button" title="Edit" value="Edit"  visible=false /></div>
        <div>
            <asp:Button ID="btnHandoverCheck" runat="server" OnClientClick="OpenHandoverCheckPage(); return false;"
                Enabled="false" TabIndex="46" />
        </div>
        <div>
            <asp:Button ID="btnVoid" runat="server" Text="Void" OnClick="btnDelete_Click" /></div>
        <!--add flow menu items end-->
        <div>
            <asp:Button ID="btnBack" runat="server" Text="Back" Enabled="false" OnClientClick="javascript:backUrl();return false;" />
        </div>
    </div>
    <AjaxControlToolkit:AlwaysVisibleControlExtender ID="AlwaysVisibleControlExtender_FlowMenu"
        runat="server" TargetControlID="divFlowMenu" VerticalOffset="78" HorizontalOffset="1000">
    </AjaxControlToolkit:AlwaysVisibleControlExtender>
    </form>
</body>
</html>
<script type="text/javascript">
    LoadHoverEvent(document.all.divFlowMenu);
    Sys.Application.add_load(SetFlowPos);
    window.onscroll = SetFlowPos;
    window.onresize = SetFlowPos;      
    
  /* add by dylan 20150820 for issue u81.1  */
  function OpenHandoverCheckPage() {
    var strURL = "../Popup/PopupHandOverCheck.aspx?StationEventID="+<%=StationEventID %>
    var returnValue = window.showModalDialog(strURL, window, "DialogWidth:400px;DialogHeight:320px;help:no;status:no;scroll:no;");
        if(returnValue!=undefined &&returnValue!="")   {
            var handOverCheck = returnValue.substring(returnValue.length - 1);
            var handOverNoteText = returnValue.substring(0,returnValue.length-1);
            if(handOverCheck=="0")   {
               document.getElementById("<%=this.chkHandOver.ClientID %>").checked = false;
            } else {
               document.getElementById("<%=this.chkHandOver.ClientID %>").checked = true;
            }
            document.getElementById("<%=this.txtHandOverDesc.ClientID %>").value = handOverNoteText;
        }
    }  
</script>
